package com.mmy.dao.oa;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.mmy.domain.oa.VSysLeaveInfo;

public interface VSysLeaveInfoRepository extends JpaRepository<VSysLeaveInfo, Integer> {

	/*
	 * 根据name查找
	 */
	@Query(value = "select *  from vSysLeaveInfo where cTypeName = :strTypeName", nativeQuery = true)
	List<VSysLeaveInfo> findByTypeName(@Param("strTypeName") String strTypeName);

	/*
	 * 查找全部
	 */
	@Query(value = "select *  from vSysLeaveInfo order by iLeaveID", nativeQuery = true)
	List<VSysLeaveInfo> findAll();

}
